<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
-->

<div class="x_panel">
    <div class="x_title">
        <ol class="breadcrumb pull-left">
            <li ng-if="!settings.isRequest"><a ng-click="navigateToPath('/delivery-services')">Delivery Services</a></li>
            <li ng-if="settings.isRequest"><a ng-click="navigateToPath('/delivery-service-requests')">Delivery Service Requests</a></li>
            <li ng-if="settings.isRequest" class="active">{{dsRequest.changeType}}</li>
            <li class="active">{{deliveryServiceName}}</li>
        </ol>
        <div class="pull-right" role="group" ng-if="settings.isRequest">
            <div class="btn-group" role="group" uib-dropdown is-open="status.isopen">
                <button ng-disabled="dsRequest.status == 'rejected' || dsRequest.status == 'pending' || dsRequest.status == 'complete'" type="button" class="btn btn-link dropdown-toggle" uib-dropdown-toggle aria-haspopup="true" aria-expanded="false">
                    {{dsRequest.status | uppercase }}&nbsp;
                    <span ng-show="dsRequest.status == 'draft' || dsRequest.status == 'submitted'" class="caret"></span>
                </button>
                <ul class="dropdown-menu-right dropdown-menu" uib-dropdown-menu>
                    <li role="menuitem"><a ng-if="dsRequest.status == 'submitted'" ng-click="editStatus('draft')">Change status to: DRAFT</a></li>
                    <li role="menuitem"><a ng-if="dsRequest.status == 'draft'" ng-click="editStatus('submitted')">Change status to: SUBMITTED</a></li>
                </ul>
            </div>
            <button class="btn btn-primary" title="View Comments" ng-click="viewComments()">View Comments</button>
        </div>
        <div class="pull-right" role="group" ng-show="!settings.isRequest && !settings.isNew">
            <button type="button" class="btn btn-primary" title="Delivery Service Charts" ng-if="showChartsButton" ng-click="openCharts(deliveryService)"><i class="fa fa-bar-chart fa-fw"></i></button>
            <div class="btn-group" role="group" uib-dropdown is-open="more.isopen">
                <button type="button" class="btn btn-default dropdown-toggle" uib-dropdown-toggle aria-haspopup="true" aria-expanded="false">
                    More&nbsp;
                    <span class="caret"></span>
                </button>
                <ul class="dropdown-menu-right dropdown-menu" uib-dropdown-menu>
                    <li role="menuitem"><a ng-click="clone(deliveryService)">Clone Delivery Service</a></li>
                    <li class="divider"></li>
                    <li role="menuitem"><a ng-click="manageSslKeys()">Manage SSL Keys</a></li>
                    <li role="menuitem"><a ng-click="manageUrlSigKeys()">Manage URL Sig Keys</a></li>
                    <li role="menuitem"><a ng-click="manageUriSigningKeys()">Manage URI Signing Keys</a></li>
                    <li class="divider"></li>
                    <li role="menuitem"><a ng-click="viewServers()">View Servers</a></li>
                    <li role="menuitem"><a ng-click="viewRegexes()">View Regexes</a></li>
                    <li role="menuitem"><a ng-click="viewJobs()">View Invalidation Requests</a></li>
                </ul>
            </div>
        </div>
        <div class="clearfix"></div>
    </div>
    <div class="x_content">
        <br>
        <form name="deliveryServiceForm" class="form-horizontal form-label-left" novalidate>

            <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.active), 'has-feedback': hasError(deliveryServiceForm.active)}">
                <label class="control-label col-md-2 col-sm-2 col-xs-12">
                    <span uib-popover-html="label('active', 'desc')" popover-trigger="click" popover-placement="top" popover-append-to-body="true" popover-class="popover-class">{{label('active', 'title')}}</span> *
                </label>
                <div class="col-md-10 col-sm-10 col-xs-12">
                    <select name="active" class="form-control" ng-model="deliveryService.active" ng-options="x.value as x.label for x in falseTrue" required>
                        <option value="">Select...</option>
                    </select>
                    <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.active, 'required')">Required</small>
                    <small class="input-diff" ng-show="settings.isRequest && open() && deliveryService.active != dsCurrent.active">Current Value: [ {{dsCurrent.active}} ]</small>
                </div>
            </div>

            <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.type), 'has-feedback': hasError(deliveryServiceForm.type)}">
                <label class="control-label col-md-2 col-sm-2 col-xs-12">
                    <span uib-popover-html="label('typeId', 'desc')" popover-trigger="click" popover-placement="top" popover-append-to-body="true" popover-class="popover-class">{{label('typeId', 'title')}}</span> *
                </label>
                <div class="col-md-10 col-sm-10 col-xs-12">
                    <select name="type" class="form-control" ng-model="deliveryService.typeId" ng-options="type.id as type.name for type in types" required>
                        <option value="">Select...</option>
                    </select>
                    <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.type, 'required')">Required</small>
                    <small class="input-diff" ng-show="settings.isRequest && open() && deliveryService.typeId != dsCurrent.typeId">Current Value: [ {{dsCurrent.type}} ]</small>
                    <small ng-show="deliveryService.typeId"><a href="/#!/types/{{deliveryService.typeId}}" target="_blank">View Details&nbsp;&nbsp;<i class="fa fs-xs fa-external-link"></i></a></small>
                </div>
            </div>

            <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.xmlId), 'has-feedback': hasError(deliveryServiceForm.xmlId)}">
                <label class="control-label col-md-2 col-sm-2 col-xs-12">
                    <span uib-popover-html="label('xmlId', 'desc')" popover-trigger="click" popover-placement="top" popover-append-to-body="true" popover-class="popover-class">{{label('xmlId', 'title')}}</span> *
                </label>
                <div class="col-md-10 col-sm-10 col-xs-12">
                    <input name="xmlId" type="text" class="form-control" placeholder="Unique id used for the delivery service" ng-model="deliveryService.xmlId" ng-required="true" ng-maxlength="48" ng-pattern="/^\S*$/" ng-readonly="(!settings.isRequest && !settings.isNew) || (settings.isRequest && changeType == 'update')" autofocus>
                    <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.xmlId, 'required')">Required</small>
                    <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.xmlId, 'maxlength')">Too Long</small>
                    <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.xmlId, 'pattern')">No spaces</small>
                    <small class="input-diff" ng-show="settings.isRequest && open() && deliveryService.xmlId != dsCurrent.xmlId">Current Value: [ {{dsCurrent.xmlId}} ]</small>
                    <span ng-show="hasError(deliveryServiceForm.xmlId)" class="form-control-feedback"><i class="fa fa-times"></i></span>
                </div>
            </div>

            <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.displayName), 'has-feedback': hasError(deliveryServiceForm.displayName)}">
                <label class="control-label col-md-2 col-sm-2 col-xs-12">
                    <span uib-popover-html="label('displayName', 'desc')" popover-trigger="click" popover-placement="top" popover-append-to-body="true" popover-class="popover-class">{{label('displayName', 'title')}}</span> *
                </label>
                <div class="col-md-10 col-sm-10 col-xs-12">
                    <input name="displayName" type="text" class="form-control" ng-model="deliveryService.displayName" ng-maxlength="48" required autofocus>
                    <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.displayName, 'required')">Required</small>
                    <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.displayName, 'maxlength')">Too Long</small>
                    <small class="input-diff" ng-show="settings.isRequest && open() && deliveryService.displayName != dsCurrent.displayName">Current Value: [ {{dsCurrent.displayName}} ]</small>
                    <span ng-show="hasError(deliveryServiceForm.displayName)" class="form-control-feedback"><i class="fa fa-times"></i></span>
                </div>
            </div>

            <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.tenantId), 'has-feedback': hasError(deliveryServiceForm.tenantId)}">
                <label class="control-label col-md-2 col-sm-2 col-xs-12">
                    <span uib-popover-html="label('tenantId', 'desc')" popover-trigger="click" popover-placement="top" popover-append-to-body="true" popover-class="popover-class">{{label('tenantId', 'title')}}</span> *
                </label>
                <div class="col-md-10 col-sm-10 col-xs-12">
                    <select name="tenantId" class="form-control" ng-model="deliveryService.tenantId" ng-options="tenant.id as tenantLabel(tenant) for tenant in tenants" required>
                        <option value="">Select...</option>
                    </select>
                    <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.tenantId, 'required')">Required</small>
                    <small class="input-diff" ng-show="settings.isRequest && open() && deliveryService.tenantId != dsCurrent.tenantId">Current Value: [ {{dsCurrent.tenant}} ]</small>
                    <small ng-show="deliveryService.tenantId"><a href="/#!/tenants/{{deliveryService.tenantId}}" target="_blank">View Details&nbsp;&nbsp;<i class="fa fs-xs fa-external-link"></i></a></small>
                </div>
            </div>

            <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.cdn), 'has-feedback': hasError(deliveryServiceForm.cdn)}">
                <label class="control-label col-md-2 col-sm-2 col-xs-12">
                    <span uib-popover-html="label('cdnId', 'desc')" popover-trigger="click" popover-placement="top" popover-append-to-body="true" popover-class="popover-class">{{label('cdnId', 'title')}}</span> *
                </label>
                <div class="col-md-10 col-sm-10 col-xs-12">
                    <select name="cdn" class="form-control" ng-model="deliveryService.cdnId" ng-options="cdn.id as cdn.name for cdn in cdns" required>
                        <option value="">Select...</option>
                    </select>
                    <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.cdn, 'required')">Required</small>
                    <small class="input-diff" ng-show="settings.isRequest && open() && deliveryService.cdnId != dsCurrent.cdnId">Current Value: [ {{dsCurrent.cdnName}} ]</small>
                    <small ng-show="deliveryService.cdnId"><a href="/#!/cdns/{{deliveryService.cdnId}}" target="_blank">View Details&nbsp;&nbsp;<i class="fa fs-xs fa-external-link"></i></a></small>
                </div>
            </div>

            <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.orgServerFqdn), 'has-feedback': hasError(deliveryServiceForm.orgServerFqdn)}">
                <label class="control-label col-md-2 col-sm-2 col-xs-12">
                    <span uib-popover-html="label('orgServerFqdn', 'desc')" popover-trigger="click" popover-placement="top" popover-append-to-body="true" popover-class="popover-class">{{label('orgServerFqdn', 'title')}}</span> *
                </label>
                <div class="col-md-10 col-sm-10 col-xs-12">
                    <input name="orgServerFqdn" type="text" class="form-control" placeholder="http(s)//:" ng-model="deliveryService.orgServerFqdn" ng-pattern="/^(https?:\/\/)([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*(:\d{1,5})?$/" required autofocus>
                    <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.orgServerFqdn, 'required')">Required</small>
                    <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.orgServerFqdn, 'pattern')">Must start with http:// or https:// and be followed by a valid hostname with an optional port (no trailing slash)</small>
                    <small class="input-diff" ng-show="settings.isRequest && open() && deliveryService.orgServerFqdn != dsCurrent.orgServerFqdn">Current Value: [ {{dsCurrent.orgServerFqdn}} ]</small>
                    <span ng-show="hasError(deliveryServiceForm.orgServerFqdn)" class="form-control-feedback"><i class="fa fa-times"></i></span>
                </div>
            </div>

            <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.protocol), 'has-feedback': hasError(deliveryServiceForm.protocol)}">
                <label class="control-label col-md-2 col-sm-2 col-xs-12">
                    <span uib-popover-html="label('protocol', 'desc')" popover-trigger="click" popover-placement="top" popover-append-to-body="true" popover-class="popover-class">{{label('protocol', 'title')}}</span> *
                </label>
                <div class="col-md-10 col-sm-10 col-xs-12">
                    <select name="protocol" class="form-control" ng-model="deliveryService.protocol" ng-options="protocol.value as protocol.label for protocol in protocols" required>
                        <option value="">Select...</option>
                    </select>
                    <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.protocol, 'required')">Required</small>
                    <small class="input-diff" ng-show="settings.isRequest && open() && deliveryService.protocol != dsCurrent.protocol">Current Value: [ {{magicNumberLabel(protocols, dsCurrent.protocol)}} ]</small>
                </div>
            </div>

            <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.longDesc), 'has-feedback': hasError(deliveryServiceForm.longDesc)}">
                <label class="control-label col-md-2 col-sm-2 col-xs-12">
                    <span uib-popover-html="label('longDesc', 'desc')" popover-trigger="click" popover-placement="top" popover-append-to-body="true" popover-class="popover-class">{{label('longDesc', 'title')}}</span> *
                </label>
                <div class="col-md-10 col-sm-10 col-xs-12">
                    <input name="longDesc" type="text" class="form-control" ng-model="deliveryService.longDesc" ng-maxlength="1024" autofocus required>
                    <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.longDesc, 'required')">Required</small>
                    <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.longDesc, 'maxlength')">Too Long</small>
                    <small class="input-diff" ng-show="settings.isRequest && open() && deliveryService.longDesc != dsCurrent.longDesc">Current Value: [ {{dsCurrent.longDesc}} ]</small>
                    <span ng-show="hasError(deliveryServiceForm.longDesc)" class="form-control-feedback"><i class="fa fa-times"></i></span>
                </div>
            </div>

            <div class="form-group" ng-if="!settings.isNew && !settings.isRequest">
                <label class="control-label col-md-2 col-sm-2 col-xs-12">Delivery Service URLs</label>
                <div class="col-md-10 col-sm-10 col-xs-12">
                    <textarea name="edgeFQDNs" rows="4" cols="17" class="form-control readonly" readonly>{{edgeFQDNs(deliveryService)}}</textarea>
                </div>
            </div>

            <div ng-show="advancedShowing">

                <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.routingName), 'has-feedback': hasError(deliveryServiceForm.routingName)}">
                    <label class="control-label col-md-2 col-sm-2 col-xs-12">
                        <span uib-popover-html="label('routingName', 'desc')" popover-trigger="click" popover-placement="top" popover-append-to-body="true" popover-class="popover-class">{{label('routingName', 'title')}}</span> *
                    </label>
                    <div class="col-md-10 col-sm-10 col-xs-12">
                        <small class="input-warning" ng-show="!settings.isNew && deliveryServiceForm.routingName.$dirty">Warning: Changing the routing name may require SSL certificates to be updated.</small>
                        <input name="routingName" type="text" class="form-control" placeholder="Routing name used for the delivery service resulting in FQDN = <routing name>.<key>.<CDN domain>" ng-model="deliveryService.routingName" ng-maxlength="48" ng-pattern="/^([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$/" required autofocus>
                        <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.routingName, 'required')">Required</small>
                        <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.routingName, 'maxlength')">Too Long</small>
                        <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.routingName, 'pattern')">Invalid. Must be a valid hostname without periods</small>
                        <small class="input-diff" ng-show="settings.isRequest && open() && deliveryService.routingName != dsCurrent.routingName">Current Value: [ {{dsCurrent.routingName}} ]</small>
                        <span ng-show="hasError(deliveryServiceForm.routingName)" class="form-control-feedback"><i class="fa fa-times"></i></span>
                    </div>
                </div>

                <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.deepCachingType), 'has-feedback': hasError(deliveryServiceForm.deepCachingType)}">
                    <label class="control-label col-md-2 col-sm-2 col-xs-12">
                        <span uib-popover-html="label('deepCachingType', 'desc')" popover-trigger="click" popover-placement="top" popover-append-to-body="true" popover-class="popover-class">{{label('deepCachingType', 'title')}}</span> *
                    </label>
                    <div class="col-md-10 col-sm-10 col-xs-12">
                        <select id="deepCachingType" name="deepCachingType" class="form-control" ng-model="deliveryService.deepCachingType" ng-options="dct.value as dct.label for dct in deepCachingTypes" required>
                            <option value="">Select...</option>
                        </select>
                        <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.deepCachingType, 'required')">Required</small>
                        <small class="input-diff" ng-show="settings.isRequest && open() && deliveryService.deepCachingType != dsCurrent.deepCachingType">Current Value: [ {{dsCurrent.deepCachingType}} ]</small>
                    </div>
                </div>

                <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.dscp), 'has-feedback': hasError(deliveryServiceForm.dscp)}">
                    <label class="control-label col-md-2 col-sm-2 col-xs-12">
                        <span uib-popover-html="label('dscp', 'desc')" popover-trigger="click" popover-placement="top" popover-append-to-body="true" popover-class="popover-class">{{label('dscp', 'title')}}</span> *
                    </label>
                    <div class="col-md-10 col-sm-10 col-xs-12">
                        <select name="dscp" class="form-control" ng-model="deliveryService.dscp" ng-options="dcsp.value as dcsp.label for dcsp in dscps" required>
                            <option value="">Select...</option>
                        </select>
                        <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.dscp, 'required')">Required</small>
                        <small class="input-diff" ng-show="settings.isRequest && open() && deliveryService.dscp != dsCurrent.dscp">Current Value: [ {{magicNumberLabel(dscps, dsCurrent.dscp)}} ]</small>
                    </div>
                </div>

                <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.ipv6RoutingEnabled), 'has-feedback': hasError(deliveryServiceForm.ipv6RoutingEnabled)}">
                    <label class="control-label col-md-2 col-sm-2 col-xs-12">
                        <span uib-popover-html="label('ipv6RoutingEnabled', 'desc')" popover-trigger="click" popover-placement="top" popover-append-to-body="true" popover-class="popover-class">{{label('ipv6RoutingEnabled', 'title')}}</span> *
                    </label>
                    <div class="col-md-10 col-sm-10 col-xs-12">
                        <select name="ipv6RoutingEnabled" class="form-control" ng-model="deliveryService.ipv6RoutingEnabled" ng-options="x.value as x.label for x in falseTrue" required>
                            <option value="">Select...</option>
                        </select>
                        <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.ipv6RoutingEnabled, 'required')">Required</small>
                        <small class="input-diff" ng-show="settings.isRequest && open() && deliveryService.ipv6RoutingEnabled != dsCurrent.ipv6RoutingEnabled">Current Value: [ {{dsCurrent.ipv6RoutingEnabled}} ]</small>
                    </div>
                </div>

                <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.rangeRequestHandling), 'has-feedback': hasError(deliveryServiceForm.rangeRequestHandling)}">
                    <label class="control-label col-md-2 col-sm-2 col-xs-12">
                        <span uib-popover-html="label('rangeRequestHandling', 'desc')" popover-trigger="click" popover-placement="top" popover-append-to-body="true" popover-class="popover-class">{{label('rangeRequestHandling', 'title')}}</span> *
                    </label>
                    <div class="col-md-10 col-sm-10 col-xs-12">
                        <select name="rangeRequestHandling" class="form-control" ng-model="deliveryService.rangeRequestHandling" ng-options="rrh.value as rrh.label for rrh in rrhs" required>
                            <option value="">Select...</option>
                        </select>
                        <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.rangeRequestHandling, 'required')">Required</small>
                        <small class="input-diff" ng-show="settings.isRequest && open() && deliveryService.rangeRequestHandling != dsCurrent.rangeRequestHandling">Current Value: [ {{magicNumberLabel(rrhs, dsCurrent.rangeRequestHandling)}} ]</small>
                    </div>
                </div>

                <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.qstringIgnore), 'has-feedback': hasError(deliveryServiceForm.qstringIgnore)}">
                    <label class="control-label col-md-2 col-sm-2 col-xs-12">
                        <span uib-popover-html="label('qstringIgnore', 'desc')" popover-trigger="click" popover-placement="top" popover-append-to-body="true" popover-class="popover-class">{{label('qstringIgnore', 'title')}}</span> *
                    </label>
                    <div class="col-md-10 col-sm-10 col-xs-12">
                        <select name="qstringIgnore" class="form-control" ng-model="deliveryService.qstringIgnore" ng-options="qs.value as qs.label for qs in qStrings" required>
                            <option value="">Select...</option>
                        </select>
                        <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.qstringIgnore, 'required')">Required</small>
                        <small class="input-diff" ng-show="settings.isRequest && open() && deliveryService.qstringIgnore != dsCurrent.qstringIgnore">Current Value: [ {{magicNumberLabel(qStrings, dsCurrent.qstringIgnore)}} ]</small>
                    </div>
                </div>

                <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.multiSiteOrigin), 'has-feedback': hasError(deliveryServiceForm.multiSiteOrigin)}">
                    <label class="control-label col-md-2 col-sm-2 col-xs-12">
                        <span uib-popover-html="label('multiSiteOrigin', 'desc')" popover-trigger="click" popover-placement="top" popover-append-to-body="true" popover-class="popover-class">{{label('multiSiteOrigin', 'title')}}</span> *
                    </label>
                    <div class="col-md-10 col-sm-10 col-xs-12">
                        <select name="multiSiteOrigin" class="form-control" ng-model="deliveryService.multiSiteOrigin" ng-options="x.value as x.label for x in falseTrue" required>
                            <option value="">Select...</option>
                        </select>
                        <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.multiSiteOrigin, 'required')">Required</small>
                        <small class="input-diff" ng-show="settings.isRequest && open() && deliveryService.multiSiteOrigin != dsCurrent.multiSiteOrigin">Current Value: [ {{dsCurrent.multiSiteOrigin}} ]</small>
                    </div>
                </div>

                <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.logsEnabled), 'has-feedback': hasError(deliveryServiceForm.logsEnabled)}">
                    <label class="control-label col-md-2 col-sm-2 col-xs-12">
                        <span uib-popover-html="label('logsEnabled', 'desc')" popover-trigger="click" popover-placement="top" popover-append-to-body="true" popover-class="popover-class">{{label('logsEnabled', 'title')}}</span> *
                    </label>
                    <div class="col-md-10 col-sm-10 col-xs-12">
                        <select name="logsEnabled" class="form-control" ng-model="deliveryService.logsEnabled" ng-options="x.value as x.label for x in falseTrue" required>
                            <option value="">Select...</option>
                        </select>
                        <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.logsEnabled, 'required')">Required</small>
                        <small class="input-diff" ng-show="settings.isRequest && open() && deliveryService.logsEnabled != dsCurrent.logsEnabled">Current Value: [ {{dsCurrent.logsEnabled}} ]</small>
                    </div>
                </div>

                <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.initialDispersion), 'has-feedback': hasError(deliveryServiceForm.initialDispersion)}">
                    <label class="control-label col-md-2 col-sm-2 col-xs-12">
                        <span uib-popover-html="label('initialDispersion', 'desc')" popover-trigger="click" popover-placement="top" popover-append-to-body="true" popover-class="popover-class">{{label('initialDispersion', 'title')}}</span> *
                    </label>
                    <div class="col-md-10 col-sm-10 col-xs-12">
                        <select name="initialDispersion" class="form-control" ng-model="deliveryService.initialDispersion" ng-options="disp.value as disp.label for disp in dispersions" required>
                            <option value="">Select...</option>
                        </select>
                        <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.initialDispersion, 'required')">Required</small>
                        <small class="input-diff" ng-show="settings.isRequest && open() && deliveryService.initialDispersion != dsCurrent.initialDispersion">Current Value: [ {{magicNumberLabel(dispersions, dsCurrent.initialDispersion)}} ]</small>
                    </div>
                </div>

                <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.regionalGeoBlocking), 'has-feedback': hasError(deliveryServiceForm.regionalGeoBlocking)}">
                    <label class="control-label col-md-2 col-sm-2 col-xs-12">
                        <span uib-popover-html="label('regionalGeoBlocking', 'desc')" popover-trigger="click" popover-placement="top" popover-append-to-body="true" popover-class="popover-class">{{label('regionalGeoBlocking', 'title')}}</span> *
                    </label>
                    <div class="col-md-10 col-sm-10 col-xs-12">
                        <select name="regionalGeoBlocking" class="form-control" ng-model="deliveryService.regionalGeoBlocking" ng-options="x.value as x.label for x in falseTrue" required>
                            <option value="">Select...</option>
                        </select>
                        <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.regionalGeoBlocking, 'required')">Required</small>
                        <small class="input-diff" ng-show="settings.isRequest && open() && deliveryService.regionalGeoBlocking != dsCurrent.regionalGeoBlocking">Current Value: [ {{dsCurrent.regionalGeoBlocking}} ]</small>
                    </div>
                </div>

                <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.anonymousBlockingEnabled), 'has-feedback': hasError(deliveryServiceForm.anonymousBlockingEnabled)}">
                    <label class="control-label col-md-2 col-sm-2 col-xs-12">
                        <span uib-popover-html="label('anonymousBlockingEnabled', 'desc')" popover-trigger="click" popover-placement="top" popover-append-to-body="true" popover-class="popover-class">{{label('anonymousBlockingEnabled', 'title')}}</span> *
                    </label>
                    <div class="col-md-10 col-sm-10 col-xs-12">
                        <select name="anonymousBlockingEnabled" class="form-control" ng-model="deliveryService.anonymousBlockingEnabled" ng-options="x.value as x.label for x in falseTrue" required>
                            <option value="">Select...</option>
                        </select>
                        <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.anonymousBlockingEnabled, 'required')">Required</small>
                        <small class="input-diff" ng-show="settings.isRequest && open() && deliveryService.anonymousBlockingEnabled != dsCurrent.anonymousBlockingEnabled">Current Value: [ {{dsCurrent.anonymousBlockingEnabled}} ]</small>
                    </div>
                </div>

                <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.geoProvider), 'has-feedback': hasError(deliveryServiceForm.geoProvider)}">
                    <label class="control-label col-md-2 col-sm-2 col-xs-12">
                        <span uib-popover-html="label('geoProvider', 'desc')" popover-trigger="click" popover-placement="top" popover-append-to-body="true" popover-class="popover-class">{{label('geoProvider', 'title')}}</span> *
                    </label>
                    <div class="col-md-10 col-sm-10 col-xs-12">
                        <select name="geoProvider" class="form-control" ng-model="deliveryService.geoProvider" ng-options="gp.value as gp.label for gp in geoProviders" required>
                            <option value="">Select...</option>
                        </select>
                        <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.geoProvider, 'required')">Required</small>
                        <small class="input-diff" ng-show="settings.isRequest && open() && deliveryService.geoProvider != dsCurrent.geoProvider">Current Value: [ {{magicNumberLabel(geoProviders, dsCurrent.geoProvider)}} ]</small>
                    </div>
                </div>

                <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.missLat), 'has-feedback': hasError(deliveryServiceForm.missLat)}">
                    <label class="control-label col-md-2 col-sm-2 col-xs-12">
                        <span uib-popover-html="label('missLat', 'desc')" popover-trigger="click" popover-placement="top" popover-append-to-body="true" popover-class="popover-class">{{label('missLat', 'title')}}</span> *
                    </label>
                    <div class="col-md-10 col-sm-10 col-xs-12">
                        <input name="missLat" type="number" class="form-control" ng-model="deliveryService.missLat" required autofocus>
                        <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.missLat, 'required')">Required</small>
                        <small class="input-diff" ng-show="settings.isRequest && open() && deliveryService.missLat != dsCurrent.missLat">Current Value: [ {{dsCurrent.missLat}} ]</small>
                        <span ng-show="hasError(deliveryServiceForm.missLat)" class="form-control-feedback"><i class="fa fa-times"></i></span>
                    </div>
                </div>

                <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.missLong), 'has-feedback': hasError(deliveryServiceForm.missLong)}">
                    <label class="control-label col-md-2 col-sm-2 col-xs-12">
                        <span uib-popover-html="label('missLong', 'desc')" popover-trigger="click" popover-placement="top" popover-append-to-body="true" popover-class="popover-class">{{label('missLong', 'title')}}</span> *
                    </label>
                    <div class="col-md-10 col-sm-10 col-xs-12">
                        <input name="missLong" type="number" class="form-control" ng-model="deliveryService.missLong" required autofocus>
                        <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.missLong, 'required')">Required</small>
                        <small class="input-diff" ng-show="settings.isRequest && open() && deliveryService.missLong != dsCurrent.missLong">Current Value: [ {{dsCurrent.missLong}} ]</small>
                        <span ng-show="hasError(deliveryServiceForm.missLong)" class="form-control-feedback"><i class="fa fa-times"></i></span>
                    </div>
                </div>

                <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.geoLimit), 'has-feedback': hasError(deliveryServiceForm.geoLimit)}">
                    <label class="control-label col-md-2 col-sm-2 col-xs-12">
                        <span uib-popover-html="label('geoLimit', 'desc')" popover-trigger="click" popover-placement="top" popover-append-to-body="true" popover-class="popover-class">{{label('geoLimit', 'title')}}</span> *
                    </label>
                    <div class="col-md-10 col-sm-10 col-xs-12">
                        <select name="geoLimit" class="form-control" ng-model="deliveryService.geoLimit" ng-options="gl.value as gl.label for gl in geoLimits" required>
                            <option value="">Select...</option>
                        </select>
                        <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.geoLimit, 'required')">Required</small>
                        <small class="input-diff" ng-show="settings.isRequest && open() && deliveryService.geoLimit != dsCurrent.geoLimit">Current Value: [ {{magicNumberLabel(geoLimits, dsCurrent.geoLimit)}} ]</small>
                    </div>
                </div>

                <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.geoLimitCountries), 'has-feedback': hasError(deliveryServiceForm.geoLimitCountries)}">
                    <label class="control-label col-md-2 col-sm-2 col-xs-12">
                        <span uib-popover-html="label('geoLimitCountries', 'desc')" popover-trigger="click" popover-placement="top" popover-append-to-body="true" popover-class="popover-class">{{label('geoLimitCountries', 'title')}}</span>
                    </label>
                    <div class="col-md-10 col-sm-10 col-xs-12">
                        <input name="geoLimitCountries" type="text" class="form-control" ng-model="deliveryService.geoLimitCountries" ng-maxlength="255" autofocus>
                        <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.geoLimitCountries, 'maxlength')">Too Long</small>
                        <small class="input-diff" ng-show="settings.isRequest && open() && deliveryService.geoLimitCountries != dsCurrent.geoLimitCountries">Current Value: [ {{dsCurrent.geoLimitCountries}} ]</small>
                        <span ng-show="hasError(deliveryServiceForm.geoLimitCountries)" class="form-control-feedback"><i class="fa fa-times"></i></span>
                    </div>
                </div>

                <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.geoLimitRedirectURL), 'has-feedback': hasError(deliveryServiceForm.geoLimitRedirectURL)}">
                    <label class="control-label col-md-2 col-sm-2 col-xs-12">
                        <span uib-popover-html="label('geoLimitRedirectURL', 'desc')" popover-trigger="click" popover-placement="top" popover-append-to-body="true" popover-class="popover-class">{{label('geoLimitRedirectURL', 'title')}}</span>
                    </label>
                    <div class="col-md-10 col-sm-10 col-xs-12">
                        <input name="geoLimitRedirectURL" type="text" class="form-control" ng-model="deliveryService.geoLimitRedirectURL" ng-pattern="/^(https?:\/\/)/" autofocus>
                        <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.geoLimitRedirectURL, 'pattern')">Must start with http:// or https://</small>
                        <small class="input-diff" ng-show="settings.isRequest && open() && deliveryService.geoLimitRedirectURL != dsCurrent.geoLimitRedirectURL">Current Value: [ {{dsCurrent.geoLimitRedirectURL}} ]</small>
                        <span ng-show="hasError(deliveryServiceForm.geoLimitRedirectURL)" class="form-control-feedback"><i class="fa fa-times"></i></span>
                    </div>
                </div>

                <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.signingAlgorithm), 'has-feedback': hasError(deliveryServiceForm.signingAlgorithm)}">
                    <label class="control-label col-md-2 col-sm-2 col-xs-12">
                        <span uib-popover-html="label('signingAlgorithm', 'desc')" popover-trigger="click" popover-placement="top" popover-append-to-body="true" popover-class="popover-class">{{label('signingAlgorithm', 'title')}}</span>
                    </label>
                    <div class="col-md-10 col-sm-10 col-xs-12">
                        <select name="signingAlgorithm" class="form-control" ng-model="deliveryService.signingAlgorithm" ng-options="sa.value as sa.label for sa in signingAlgos">
                            <option value="">Select...</option>
                        </select>
                        <small class="input-diff" ng-show="settings.isRequest && open() && deliveryService.signingAlgorithm != dsCurrent.signingAlgorithm">Current Value: [ {{magicNumberLabel(signingAlgos, dsCurrent.signingAlgorithm)}} ]</small>
                    </div>
                </div>

                <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.httpBypassFqdn), 'has-feedback': hasError(deliveryServiceForm.httpBypassFqdn)}">
                    <label class="control-label col-md-2 col-sm-2 col-xs-12">
                        <span uib-popover-html="label('httpBypassFqdn', 'desc')" popover-trigger="click" popover-placement="top" popover-append-to-body="true" popover-class="popover-class">{{label('httpBypassFqdn', 'title')}}</span>
                    </label>
                    <div class="col-md-10 col-sm-10 col-xs-12">
                        <input name="httpBypassFqdn" type="text" class="form-control" ng-model="deliveryService.httpBypassFqdn" ng-pattern="/^(https?:\/\/)/" autofocus>
                        <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.httpBypassFqdn, 'pattern')">Must start with http:// or https://</small>
                        <small class="input-diff" ng-show="settings.isRequest && open() && deliveryService.httpBypassFqdn != dsCurrent.httpBypassFqdn">Current Value: [ {{dsCurrent.httpBypassFqdn}} ]</small>
                        <span ng-show="hasError(deliveryServiceForm.httpBypassFqdn)" class="form-control-feedback"><i class="fa fa-times"></i></span>
                    </div>
                </div>

                <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.dnsBypassTtl), 'has-feedback': hasError(deliveryServiceForm.dnsBypassTtl)}">
                    <label class="control-label col-md-2 col-sm-2 col-xs-12">
                        <span uib-popover-html="label('dnsBypassTtl', 'desc')" popover-trigger="click" popover-placement="top" popover-append-to-body="true" popover-class="popover-class">{{label('dnsBypassTtl', 'title')}}</span>
                    </label>
                    <div class="col-md-10 col-sm-10 col-xs-12">
                        <input name="dnsBypassTtl" type="number" class="form-control" ng-model="deliveryService.dnsBypassTtl" ng-pattern="/^\d+$/" autofocus>
                        <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.dnsBypassTtl, 'pattern')">Whole Number</small>
                        <small class="input-diff" ng-show="settings.isRequest && open() && deliveryService.dnsBypassTtl != dsCurrent.dnsBypassTtl">Current Value: [ {{dsCurrent.dnsBypassTtl}} ]</small>
                        <span ng-show="hasError(deliveryServiceForm.dnsBypassTtl)" class="form-control-feedback"><i class="fa fa-times"></i></span>
                    </div>
                </div>

                <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.ccrDnsTtl), 'has-feedback': hasError(deliveryServiceForm.ccrDnsTtl)}">
                    <label class="control-label col-md-2 col-sm-2 col-xs-12">
                        <span uib-popover-html="label('ccrDnsTtl', 'desc')" popover-trigger="click" popover-placement="top" popover-append-to-body="true" popover-class="popover-class">{{label('ccrDnsTtl', 'title')}}</span>
                    </label>
                    <div class="col-md-10 col-sm-10 col-xs-12">
                        <input name="ccrDnsTtl" type="number" class="form-control" ng-model="deliveryService.ccrDnsTtl" ng-pattern="/^\d+$/" autofocus>
                        <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.ccrDnsTtl, 'pattern')">Whole Number</small>
                        <small class="input-diff" ng-show="settings.isRequest && open() && deliveryService.ccrDnsTtl != dsCurrent.ccrDnsTtl">Current Value: [ {{dsCurrent.ccrDnsTtl}} ]</small>
                        <span ng-show="hasError(deliveryServiceForm.ccrDnsTtl)" class="form-control-feedback"><i class="fa fa-times"></i></span>
                    </div>
                </div>

                <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.profile), 'has-feedback': hasError(deliveryServiceForm.profile)}">
                    <label class="control-label col-md-2 col-sm-2 col-xs-12">
                        <span uib-popover-html="label('profileId', 'desc')" popover-trigger="click" popover-placement="top" popover-append-to-body="true" popover-class="popover-class">{{label('profileId', 'title')}}</span>
                    </label>
                    <div class="col-md-10 col-sm-10 col-xs-12">
                        <select name="profile" class="form-control" ng-model="deliveryService.profileId" ng-options="profile.id as profile.name for profile in profiles">
                            <option value="">Select...</option>
                        </select>
                        <small class="input-diff" ng-show="settings.isRequest && open() && deliveryService.profileId != dsCurrent.profileId">Current Value: [ {{dsCurrent.profileName}} ]</small>
                        <small ng-show="deliveryService.profileId"><a href="/#!/profiles/{{deliveryService.profileId}}" target="_blank">View Details&nbsp;&nbsp;<i class="fa fs-xs fa-external-link"></i></a></small>
                    </div>
                </div>

                <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.globalMaxMbps), 'has-feedback': hasError(deliveryServiceForm.globalMaxMbps)}">
                    <label class="control-label col-md-2 col-sm-2 col-xs-12">
                        <span uib-popover-html="label('globalMaxMbps', 'desc')" popover-trigger="click" popover-placement="top" popover-append-to-body="true" popover-class="popover-class">{{label('globalMaxMbps', 'title')}}</span>
                    </label>
                    <div class="col-md-10 col-sm-10 col-xs-12">
                        <input name="globalMaxMbps" type="number" class="form-control" placeholder="Max bits per second allowed globally" ng-model="deliveryService.globalMaxMbps" ng-pattern="/^\d+$/" autofocus>
                        <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.globalMaxMbps, 'pattern')">Whole Number</small>
                        <small class="input-diff" ng-show="settings.isRequest && open() && deliveryService.globalMaxMbps != dsCurrent.globalMaxMbps">Current Value: [ {{dsCurrent.globalMaxMbps}} ]</small>
                        <span ng-show="hasError(deliveryServiceForm.globalMaxMbps)" class="form-control-feedback"><i class="fa fa-times"></i></span>
                    </div>
                </div>

                <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.globalMaxTps), 'has-feedback': hasError(deliveryServiceForm.globalMaxTps)}">
                    <label class="control-label col-md-2 col-sm-2 col-xs-12">
                        <span uib-popover-html="label('globalMaxTps', 'desc')" popover-trigger="click" popover-placement="top" popover-append-to-body="true" popover-class="popover-class">{{label('globalMaxTps', 'title')}}</span>
                    </label>
                    <div class="col-md-10 col-sm-10 col-xs-12">
                        <input name="globalMaxTps" type="number" class="form-control" placeholder="Max transactions per second allowed globally" ng-model="deliveryService.globalMaxTps" ng-pattern="/^\d+$/" autofocus>
                        <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.globalMaxTps, 'pattern')">Whole Number</small>
                        <small class="input-diff" ng-show="settings.isRequest && open() && deliveryService.globalMaxTps != dsCurrent.globalMaxTps">Current Value: [ {{dsCurrent.globalMaxTps}} ]</small>
                        <span ng-show="hasError(deliveryServiceForm.globalMaxTps)" class="form-control-feedback"><i class="fa fa-times"></i></span>
                    </div>
                </div>

		<div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.fqPacingRate), 'has-feedback': hasError(deliveryServiceForm.fqPacingRate)}">
                    <label class="control-label col-md-2 col-sm-2 col-xs-12">
                        <span uib-popover-html="label('fqPacingRate', 'desc')" popover-trigger="click" popover-placement="top" popover-append-to-body="true" popover-class="popover-class">{{label('fqPacingRate', 'title')}}</span>
                    </label>
                    <div class="col-md-10 col-sm-10 col-xs-12">
                        <input name="fqPacingRate" type="number" class="form-control" placeholder="Rate-limit connections to this Bytes per second" ng-model="deliveryService.fqPacingRate" ng-pattern="/^\d+$/" autofocus>
                        <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.fqPacingRate, 'pattern')">Whole Number</small>
                        <small class="input-diff" ng-show="settings.isRequest && open() && deliveryService.fqPacingRate != dsCurrent.fqPacingRate">Current Value: [ {{dsCurrent.fqPacingRate}} ]</small>
                        <span ng-show="hasError(deliveryServiceForm.fqPacingRate)" class="form-control-feedback"><i class="fa fa-times"></i></span>
                    </div>
                </div>				

                <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.edgeHeaderRewrite), 'has-feedback': hasError(deliveryServiceForm.edgeHeaderRewrite)}">
                    <label class="control-label col-md-2 col-sm-2 col-xs-12">
                        <span uib-popover-html="label('edgeHeaderRewrite', 'desc')" popover-trigger="click" popover-placement="top" popover-append-to-body="true" popover-class="popover-class">{{label('edgeHeaderRewrite', 'title')}}</span>
                    </label>
                    <div class="col-md-10 col-sm-10 col-xs-12">
                        <input name="edgeHeaderRewrite" type="text" class="form-control" ng-model="deliveryService.edgeHeaderRewrite" ng-maxlength="2048" autofocus>
                        <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.edgeHeaderRewrite, 'maxlength')">Too Long</small>
                        <small class="input-diff" ng-show="settings.isRequest && open() && deliveryService.edgeHeaderRewrite != dsCurrent.edgeHeaderRewrite">Current Value: [ {{dsCurrent.edgeHeaderRewrite}} ]</small>
                        <span ng-show="hasError(deliveryServiceForm.edgeHeaderRewrite)" class="form-control-feedback"><i class="fa fa-times"></i></span>
                    </div>
                </div>

                <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.midHeaderRewrite), 'has-feedback': hasError(deliveryServiceForm.midHeaderRewrite)}">
                    <label class="control-label col-md-2 col-sm-2 col-xs-12">
                        <span uib-popover-html="label('midHeaderRewrite', 'desc')" popover-trigger="click" popover-placement="top" popover-append-to-body="true" popover-class="popover-class">{{label('midHeaderRewrite', 'title')}}</span>
                    </label>
                    <div class="col-md-10 col-sm-10 col-xs-12">
                        <input name="midHeaderRewrite" type="text" class="form-control" ng-model="deliveryService.midHeaderRewrite" ng-maxlength="2048" autofocus>
                        <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.midHeaderRewrite, 'maxlength')">Too Long</small>
                        <small class="input-diff" ng-show="settings.isRequest && open() && deliveryService.midHeaderRewrite != dsCurrent.midHeaderRewrite">Current Value: [ {{dsCurrent.midHeaderRewrite}} ]</small>
                        <span ng-show="hasError(deliveryServiceForm.midHeaderRewrite)" class="form-control-feedback"><i class="fa fa-times"></i></span>
                    </div>
                </div>

                <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.trResponseHeaders), 'has-feedback': hasError(deliveryServiceForm.trResponseHeaders)}">
                    <label class="control-label col-md-2 col-sm-2 col-xs-12">
                        <span uib-popover-html="label('trResponseHeaders', 'desc')" popover-trigger="click" popover-placement="top" popover-append-to-body="true" popover-class="popover-class">{{label('trResponseHeaders', 'title')}}</span>
                    </label>
                    <div class="col-md-10 col-sm-10 col-xs-12">
                        <input name="trResponseHeaders" type="text" class="form-control" ng-model="deliveryService.trResponseHeaders" ng-maxlength="1024" autofocus>
                        <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.trResponseHeaders, 'maxlength')">Too Long</small>
                        <small class="input-diff" ng-show="settings.isRequest && open() && deliveryService.trResponseHeaders != dsCurrent.trResponseHeaders">Current Value: [ {{dsCurrent.trResponseHeaders}} ]</small>
                        <span ng-show="hasError(deliveryServiceForm.trResponseHeaders)" class="form-control-feedback"><i class="fa fa-times"></i></span>
                    </div>
                </div>

                <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.trRequestHeaders), 'has-feedback': hasError(deliveryServiceForm.trRequestHeaders)}">
                    <label class="control-label col-md-2 col-sm-2 col-xs-12">
                        <span uib-popover-html="label('trRequestHeaders', 'desc')" popover-trigger="click" popover-placement="top" popover-append-to-body="true" popover-class="popover-class">{{label('trRequestHeaders', 'title')}}</span>
                    </label>
                    <div class="col-md-10 col-sm-10 col-xs-12">
                        <input name="trRequestHeaders" type="text" class="form-control" ng-model="deliveryService.trRequestHeaders" ng-maxlength="1024" autofocus>
                        <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.trRequestHeaders, 'maxlength')">Too Long</small>
                        <small class="input-diff" ng-show="settings.isRequest && open() && deliveryService.trRequestHeaders != dsCurrent.trRequestHeaders">Current Value: [ {{dsCurrent.trRequestHeaders}} ]</small>
                        <span ng-show="hasError(deliveryServiceForm.trRequestHeaders)" class="form-control-feedback"><i class="fa fa-times"></i></span>
                    </div>
                </div>

                <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.regexRemap), 'has-feedback': hasError(deliveryServiceForm.regexRemap)}">
                    <label class="control-label col-md-2 col-sm-2 col-xs-12">
                        <span uib-popover-html="label('regexRemap', 'desc')" popover-trigger="click" popover-placement="top" popover-append-to-body="true" popover-class="popover-class">{{label('regexRemap', 'title')}}</span>
                    </label>
                    <div class="col-md-10 col-sm-10 col-xs-12">
                        <input name="regexRemap" type="text" class="form-control" ng-model="deliveryService.regexRemap" ng-maxlength="1024" autofocus>
                        <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.regexRemap, 'maxlength')">Too Long</small>
                        <small class="input-diff" ng-show="settings.isRequest && open() && deliveryService.regexRemap != dsCurrent.regexRemap">Current Value: [ {{dsCurrent.regexRemap}} ]</small>
                        <span ng-show="hasError(deliveryServiceForm.regexRemap)" class="form-control-feedback"><i class="fa fa-times"></i></span>
                    </div>
                </div>

                <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.cacheurl), 'has-feedback': hasError(deliveryServiceForm.cacheurl)}">
                    <label class="control-label col-md-2 col-sm-2 col-xs-12">
                        <span uib-popover-html="label('cacheurl', 'desc')" popover-trigger="click" popover-placement="top" popover-append-to-body="true" popover-class="popover-class">{{label('cacheurl', 'title')}}</span>
                    </label>
                    <div class="col-md-10 col-sm-10 col-xs-12">
                        <input name="cacheurl" type="text" class="form-control" ng-model="deliveryService.cacheurl" ng-maxlength="1024" autofocus>
                        <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.cacheurl, 'maxlength')">Too Long</small>
                        <small class="input-diff" ng-show="settings.isRequest && open() && deliveryService.cacheurl != dsCurrent.cacheurl">Current Value: [ {{dsCurrent.cacheurl}} ]</small>
                        <span ng-show="hasError(deliveryServiceForm.cacheurl)" class="form-control-feedback"><i class="fa fa-times"></i></span>
                    </div>
                </div>

                <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.remapText), 'has-feedback': hasError(deliveryServiceForm.remapText)}">
                    <label class="control-label col-md-2 col-sm-2 col-xs-12">
                        <span uib-popover-html="label('remapText', 'desc')" popover-trigger="click" popover-placement="top" popover-append-to-body="true" popover-class="popover-class">{{label('remapText', 'title')}}</span>
                    </label>
                    <div class="col-md-10 col-sm-10 col-xs-12">
                        <input name="remapText" type="text" class="form-control" ng-model="deliveryService.remapText" ng-maxlength="2048" autofocus>
                        <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.remapText, 'maxlength')">Too Long</small>
                        <small class="input-diff" ng-show="settings.isRequest && open() && deliveryService.remapText != dsCurrent.remapText">Current Value: [ {{dsCurrent.remapText}} ]</small>
                        <span ng-show="hasError(deliveryServiceForm.remapText)" class="form-control-feedback"><i class="fa fa-times"></i></span>
                    </div>
                </div>

                <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.longDesc1), 'has-feedback': hasError(deliveryServiceForm.longDesc1)}">
                    <label class="control-label col-md-2 col-sm-2 col-xs-12">
                        <span uib-popover-html="label('longDesc1', 'desc')" popover-trigger="click" popover-placement="top" popover-append-to-body="true" popover-class="popover-class">{{label('longDesc1', 'title')}}</span>
                    </label>
                    <div class="col-md-10 col-sm-10 col-xs-12">
                        <input name="longDesc1" type="text" class="form-control" ng-model="deliveryService.longDesc1" ng-maxlength="1024" autofocus>
                        <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.longDesc1, 'maxlength')">Too Long</small>
                        <small class="input-diff" ng-show="settings.isRequest && open() && deliveryService.longDesc1 != dsCurrent.longDesc1">Current Value: [ {{dsCurrent.longDesc1}} ]</small>
                        <span ng-show="hasError(deliveryServiceForm.longDesc1)" class="form-control-feedback"><i class="fa fa-times"></i></span>
                    </div>
                </div>

                <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.longDesc2), 'has-feedback': hasError(deliveryServiceForm.longDesc2)}">
                    <label class="control-label col-md-2 col-sm-2 col-xs-12">
                        <span uib-popover-html="label('longDesc2', 'desc')" popover-trigger="click" popover-placement="top" popover-append-to-body="true" popover-class="popover-class">{{label('longDesc2', 'title')}}</span>
                    </label>
                    <div class="col-md-10 col-sm-10 col-xs-12">
                        <input name="longDesc2" type="text" class="form-control" ng-model="deliveryService.longDesc2" ng-maxlength="1024" autofocus>
                        <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.longDesc2, 'maxlength')">Too Long</small>
                        <small class="input-diff" ng-show="settings.isRequest && open() && deliveryService.longDesc2 != dsCurrent.longDesc2">Current Value: [ {{dsCurrent.longDesc2}} ]</small>
                        <span ng-show="hasError(deliveryServiceForm.longDesc2)" class="form-control-feedback"><i class="fa fa-times"></i></span>
                    </div>
                </div>

                <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.infoUrl), 'has-feedback': hasError(deliveryServiceForm.infoUrl)}">
                    <label class="control-label col-md-2 col-sm-2 col-xs-12">
                        <span uib-popover-html="label('infoUrl', 'desc')" popover-trigger="click" popover-placement="top" popover-append-to-body="true" popover-class="popover-class">{{label('infoUrl', 'title')}}</span>
                    </label>
                    <div class="col-md-10 col-sm-10 col-xs-12">
                        <input name="infoUrl" type="text" class="form-control" ng-model="deliveryService.infoUrl" ng-maxlength="255" autofocus>
                        <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.infoUrl, 'maxlength')">Too Long</small>
                        <small class="input-diff" ng-show="settings.isRequest && open() && deliveryService.infoUrl != dsCurrent.infoUrl">Current Value: [ {{dsCurrent.infoUrl}} ]</small>
                        <span ng-show="hasError(deliveryServiceForm.infoUrl)" class="form-control-feedback"><i class="fa fa-times"></i></span>
                    </div>
                </div>

                <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.checkPath), 'has-feedback': hasError(deliveryServiceForm.checkPath)}">
                    <label class="control-label col-md-2 col-sm-2 col-xs-12">
                        <span uib-popover-html="label('checkPath', 'desc')" popover-trigger="click" popover-placement="top" popover-append-to-body="true" popover-class="popover-class">{{label('checkPath', 'title')}}</span>
                    </label>
                    <div class="col-md-10 col-sm-10 col-xs-12">
                        <input name="checkPath" type="text" class="form-control" ng-model="deliveryService.checkPath" ng-maxlength="255" autofocus>
                        <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.checkPath, 'maxlength')">Too Long</small>
                        <small class="input-diff" ng-show="settings.isRequest && open() && deliveryService.checkPath != dsCurrent.checkPath">Current Value: [ {{dsCurrent.checkPath}} ]</small>
                        <span ng-show="hasError(deliveryServiceForm.checkPath)" class="form-control-feedback"><i class="fa fa-times"></i></span>
                    </div>
                </div>

                <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.originShield), 'has-feedback': hasError(deliveryServiceForm.originShield)}">
                    <label class="control-label col-md-2 col-sm-2 col-xs-12">
                        <span uib-popover-html="label('originShield', 'desc')" popover-trigger="click" popover-placement="top" popover-append-to-body="true" popover-class="popover-class">{{label('originShield', 'title')}}</span>
                    </label>
                    <div class="col-md-10 col-sm-10 col-xs-12">
                        <input name="originShield" type="text" class="form-control" ng-model="deliveryService.originShield" ng-maxlength="1024" autofocus>
                        <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.originShield, 'maxlength')">Too Long</small>
                        <small class="input-diff" ng-show="settings.isRequest && open() && deliveryService.originShield != dsCurrent.originShield">Current Value: [ {{dsCurrent.originShield}} ]</small>
                        <span ng-show="hasError(deliveryServiceForm.originShield)" class="form-control-feedback"><i class="fa fa-times"></i></span>
                    </div>
                </div>

            </div>

            <div class="modal-footer">
                <button class="btn btn-link" ng-click="advancedShowing = !advancedShowing"><span ng-show="!advancedShowing">Show</span><span ng-show="advancedShowing">Hide</span> Advanced</button>
                <button type="button" class="btn btn-danger" ng-if="!settings.isNew" ng-disabled="!deletable()" ng-click="confirmDelete(deliveryService)">{{settings.deleteLabel}}</button>
                <button type="button" class="btn btn-success" ng-disabled="deliveryServiceForm.$pristine || deliveryServiceForm.$invalid || !saveable()" ng-click="save(deliveryService)">{{settings.saveLabel}}</button>
                <button type="button" class="btn btn-primary" ng-if="settings.isRequest && fulfillable()" ng-disabled="deliveryServiceForm.$invalid" ng-click="fulfillRequest(deliveryService)">Fulfill Request</button>
            </div>
        </form>
    </div>
</div>
